package com.linesum.code.design.strategy;

/**
* 
* @author chenzf
* @date 2017年8月1日
*/
public abstract class Character {
	protected WeaponBehavior behavior;

	public abstract void fight();

	public void setBehavior(WeaponBehavior behavior) {
		this.behavior = behavior;
	}

	public static void main(String[] args) {
		Character character = null;
		character = new King();
		character.fight();
		character = new Queen();
		character.fight();
		character = new Troll();
		character.fight();
		character = new Knight();
		character.fight();
	}
}
